﻿using Hotel.BLL;
using Hotel.DAL;
using Hotel.Model;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Hotel.API.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class ZuoController : ControllerBase
    {
        public ZuoController(ZuoBLL zuoBLL)
        {
            ZuoBLL = zuoBLL;
        }
        public ZuoBLL ZuoBLL { get; }
        [HttpPost("AddZuo")]
        public int AddZuo(Zuo zuo)
        {
            try
            {
                return ZuoBLL.AddZuo(zuo);
            }
            catch (Exception)
            {

                throw;
            }

        }
        [HttpGet("Show")]
        public dynamic Show()
        {
            try
            {
                return ZuoBLL.Show();
            }
            catch (Exception)
            {

                throw;
            }

        }
    }
}
